(abort "You did not download the PGS3F.LHA archive. Download it and decompress it to the same directory as you decompressed this archive before continuing.")
)
;SEE IF PAGESTREAM3 AND SOFTLOGIK ARE ASSIGNED AND EVERYTHING EXISTS
(set PGSdest (getassign "PageStream3" "a"))
(set SLdest (getassign "SoftLogik" "a"))
(if (OR (= PGSdest "") (= SLdest ""))
(abort "PageStream3: and/or SoftLogik: are not assigned. You must properly install PageStream3 before applying this update patch.")
)
(set @default-dest PGSdest)
(if (<> (exists "PageStream3:PageStream3") 1)
(abort "PageStream3 is not in the PageStream3: directory. You must properly install PageStream3 before applying this update patch.")
)
(if (<> (exists "SoftLogik:Libs") 2)
(makedir "SoftLogik:Libs" (infos))
)
(if (<> (exists "SoftLogik:Engines") 2)
(makedir "SoftLogik:Engines" (infos))
)
(if (<> (exists "SoftLogik:Printers") 2)
(makedir "SoftLogik:Printers" (infos))
)
(if (<> (exists "SoftLogik:Filters") 2)
(makedir "SoftLogik:Filters" (infos))
)
(if (<> (exists "SoftLogik:Effects") 2)
(makedir "SoftLogik:Effects" (infos))
)
(if (<> (exists "SoftLogik:Special") 2)
(makedir "SoftLogik:Special" (infos))
)
(if (<> (exists "PageStream3:Help") 2)
(makedir "PageStream3:Help" (infos))
)
(if (<> (exists "PageStream3:Macros") 2)
(makedir "PageStream3:Macros" (infos))
)
;CHECK VERSIONS INSTALLED
(working "Checking version of current PageStream3...")
(makedir "env:PageStream3")
(run "version PageStream3:PageStream3 full >env:PageStream3/temp")
(run "ram:lhex >NIL: <NIL: -qfw=ram: x PGSpatch.LHA")
(set PGSsize (getsize "ram:PageStream3.pch"))
(set PGSpatch "nil")
(if (= PGSsize 167100) (set PGSpatch ".0e"))
(if (= PGSsize 688000) (set PGSpatch ".0d"))
(if (= PGSsize 778840) (set PGSpatch ".0c"))
(if (= PGSsize 831336) (set PGSpatch ".0b"))
(if (= PGSsize 815112) (set PGSpatch ".0a"))
(if (= PGSsize 836784) (set PGSpatch ".0 "))
;DOES THE PATCH MATCH THE VERSION INSTALLED?
(if (= PGSpatch "nil")
(abort "You have not downloaded the required files for this patch.\n\nPlease refer to the Read.1st! file for instructions.")
)
(if (<> PGSpatch PGSver)
(abort "Your current PageStream3 is version 3%s, but you have downloaded a different patch!" PGSver)
)
;SEE WHAT THE USER WANTS TO INSTALL
(set ALLflag 0)
(set SMAflag 1)
(message ("\n\nYour current PageStream3 is version 3%s.\n\nThis patch will update your hard drive installation to version 3.0f.\n\nYour original PageStream3 disks will not be modified by this update." PGSver))
(set install_mode
(askchoice
(prompt
"\nSelect an installation option.\n\nChoose `ALL' if you have a full PageStream3 installation. Choose `ONLY' if you have a custom or minimum PageStream3 installation.\n")
(choices "Install ALL improved files" "Update ONLY the currently installed files")
(default 0)
(help
"\n\nThe ONLY option will check to see if a file exists before copying the new one to your hard drive. Thus, if you deleted the HP.printer driver because you didn't need it, the new one will not be installed.")
(message "\nYou do not have the full set of equivalents for the standard 35 fonts (see page 16 of the manual) in your PageStream3:Fonts/StandardFonts directory. These were not included with 3.0 or 3.0a, but were included in the PS3B2.LHA update. If you do not have these fonts (avnt_o.dmf, avnt_do.dmf...), you should download this update to get them. If you moved your fonts to another directory, it is possible that you have these fonts but the installer could not find them.")
)
;UPDATE LIBS
(working "Installing Updated Libraries...")
(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Libs x Libs.lha")
(delete "Libs.LHA" (safe))
;UPDATE SPECIAL
(working "Installing Updated Clipboard file...")
(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Special x Special.lha")
(delete "Special.LHA" (safe))
;UPDATE ENGINES
(working "Installing Updated Engines...")
(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Engines x Engines.lha")
(message "\nThe patch to PageLiner was not successful. Refer to the Read.1st file for further instructions.")
)
(message "\nPageLiner was not patched because it was not installed.")
)
(delete "ram:PageLiner20c.pch" (safe))
(delete "ram:PageLiner2ac.pch" (safe))
(delete "ram:PageLiner2bc.pch" (safe))
;INSTALL PAGELINER.PREFS
(if (exists "PageStream3:PageLiner")
(if (<> (exists "PageStream3:PageLiner.prefs") 1)
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3: x PLprefs.LHA")
)
)
(delete "PLprefs.LHA" (safe))
;INSTALL ICONS
(if (= PGSver ".0d")
(if
(askbool
(prompt
"\nIf 3.0d was your first version of PageStream3, you may not have the PageStream3 icon.\n\n"
"Do you want to install the PageStream3 icon now?\n\n")
(help
"The stack size for PageStream3 is 8192. A larger stack size is of no extra value, but the program cannot be used with a smaller stack. Stack sizes are set in programs' .info files, and can be viewed and changed with the Workbench Information command. The icon must be present to set the stack size.")
(choices "Install" "Skip this step")
(default 0)
)
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3: x PGSicon.LHA")
)
)
(delete "PGSicon.LHA" (safe))
(if (<> (exists "PageStream3:BME.info") 1)
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3: x BMEicon.LHA")
(abort "Patch was not successful. Cause was probably lack of RAM, a bad disk, or an incorrect version of PageStream3. Refer to the Read.1st! file for instructions.")
(message "\nYour PageStream3.macros file has been renamed to PageStream3.macros.bak. If you have added your own macros to PageStream3, you will need to append them to the new macros file.\n\nRefer to page 339 for more information.")
(message "\nYour BME.macros file has been renamed to BME.macros.bak. If you have added your own macros to PageStream3, you will need to append them to the new macros file.\n\nRefer to page 339 for more information.")
)
)
(working "Installing Updated Macros...")
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3:Macros x Macros.lha")
(message "\nThe next time you run PageStream3, all the font paths you have added to the program will be updated when the program is loaded. Don't worry that loading the program will take a fairly long time.\n\nThis will happen only the next time you run PageStream3.")
;INSTALL README
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3: x Read.LHA")
(delete "Read.LHA" (safe))
;DISPLAY README (Try 3 different ways!)
(run "ram:lhex >NIL: <NIL: -qfw=PageStream3: x Read.LHA")